//
//  DropMenuBtn.m
//  小团购
//
//  Created by 樊荣海 on 15/1/27.
//  Copyright (c) 2015年 樊荣海. All rights reserved.
//

#import "DropMenuBtn.h"


@implementation DropMenuBtn

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
//        // 1.右边的分割线
//        UIImage *img = [UIImage imageNamed:@"separator_filter_item.png"];
//        UIImageView *divider = [[UIImageView alloc] initWithImage:img];
//        divider.bounds = CGRectMake(0, 0, 2, DropMenuBtnH * 0.7);
//        divider.center = CGPointMake(DropMenuBtnW, DropMenuBtnH * 0.5);
//        [self addSubview:divider];
        
        // 2.文字颜色
        [self setTitleColor:globalTintColor forState:UIControlStateNormal];
        
        self.imageView.contentMode = UIViewContentModeCenter;
        
        // 3.设置被选中时的背景
        [self setBackgroundImage:[UIImage resizedImage:@"selected_bg"] forState:UIControlStateSelected];
        
//        self.backgroundColor = [UIColor redColor];
        
//        self.layer.cornerRadius = 3.0;
    }
    return self;
}

- (void)setFrame:(CGRect)frame
{
    frame.size = CGSizeMake(DropScrollViewW, DropScrollViewH);
    [super setFrame:frame];
}

- (void)setHighlighted:(BOOL)highlighted {}

- (NSArray *)titles
{
    return nil;
}

@end
